//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Project:			None
//
// Module Name:		CViewImageControl.h
//
// Environment:		Windows XX, Visual C++
//
// Description:		Create control to view any type of Images 		
//
// Title End
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	History:
//		2013.05.25	Tran Dang Bao		v01		Create New
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once

#ifndef _CViewImageControl_H_
#define _CViewImageControl_H_


#include "CImageControl.h"

//#include <afxwin.h>
#include "stdafx.h"

//#include <afxwin.h>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//	DEFINE declaration
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Define color for control 
#define DEF_COLOR_BLACK					RGB( 0x00, 0x00, 0x00 )
#define DEF_COLOR_BROWN					RGB( 0x99, 0x33, 0x00 )
#define DEF_COLOR_OLIVE					RGB( 0x33, 0x33, 0x00 )
#define DEF_COLOR_DARK_GREEN			RGB( 0x00, 0x33, 0x00 )
#define DEF_COLOR_DARK_TEAL				RGB( 0x00, 0x33, 0x66 )
#define DEF_COLOR_DARK_BLUE				RGB( 0x00, 0x00, 0x80 )
#define DEF_COLOR_INDIGO				RGB( 0x33, 0x33, 0x99 )
#define DEF_COLOR_GREY_80				RGB( 0x33, 0x33, 0x33 )
#define DEF_COLOR_DARK_RED				RGB( 0x80, 0x00, 0x00 )
#define DEF_COLOR_ORANGE				RGB( 0xFF, 0x33, 0x00 )
#define DEF_COLOR_DARK_YELLOW			RGB( 0x80, 0x80, 0x00 )
#define DEF_COLOR_GREEN					RGB( 0x00, 0x80, 0x00 )
#define DEF_COLOR_TEAL					RGB( 0x00, 0x80, 0x80 )
#define DEF_COLOR_BLUE					RGB( 0x00, 0x00, 0xFF )
#define DEF_COLOR_BLUE_GREY				RGB( 0x66, 0x66, 0x99 )
#define DEF_COLOR_GREY_50				RGB( 0x80, 0x80, 0x80 )
#define DEF_COLOR_RED					RGB( 0xFF, 0x00, 0x00 )
#define DEF_COLOR_LIGHT_ORANGE			RGB( 0xFF, 0x99, 0x00 )
#define DEF_COLOR_LIME					RGB( 0x99, 0xCC, 0x00 )
#define DEF_COLOR_SEA_GREEN				RGB( 0x33, 0x99, 0x66 )
#define DEF_COLOR_AQUA					RGB( 0x33, 0xCC, 0xCC )
#define DEF_COLOR_LIGHT_BLUE			RGB( 0x33, 0x66, 0xFF )
#define DEF_COLOR_VIOLET				RGB( 0x80, 0x00, 0x80 )
#define DEF_COLOR_GREY_40				RGB( 0x99, 0x99, 0x99 )
#define DEF_COLOR_PINK					RGB( 0xFF, 0x00, 0xFF )
#define DEF_COLOR_GOLD					RGB( 0xFF, 0xCC, 0x00 )
#define DEF_COLOR_YELLOW				RGB( 0xFF, 0xFF, 0x00 )
#define DEF_COLOR_BRIGHT_GREEN			RGB( 0x00, 0xFF, 0x00 )
#define DEF_COLOR_TURQUOISE				RGB( 0x00, 0xFF, 0xFF )
#define DEF_COLOR_SKYBLUE				RGB( 0x00, 0xCC, 0xFF )
#define DEF_COLOR_PLUM					RGB( 0x99, 0x33, 0x66 )
#define DEF_COLOR_GREY_25				RGB( 0xC0, 0xC0, 0xC0 )
#define DEF_COLOR_ROSE					RGB( 0xFF, 0x99, 0xCC )
#define DEF_COLOR_TAN					RGB( 0xFF, 0xCC, 0x99 )
#define DEF_COLOR_LIGHT_YELLOW			RGB( 0xFF, 0xFF, 0x99 )
#define DEF_COLOR_PALE_GREEN			RGB( 0xCC, 0xFF, 0xCC )
#define DEF_COLOR_PALE_TURQUOISE		RGB( 0xCC, 0xFF, 0xFF )
#define DEF_COLOR_PALE_BLUE				RGB( 0x99, 0xCC, 0xFF )
#define DEF_COLOR_LAVENDER				RGB( 0xCC, 0x99, 0xFF )
#define DEF_COLOR_WHITE					RGB( 0xFF, 0xFF, 0xFF )

#define DEF_MAX_COLOURS					100

#define MAX_IMAGE_ELEMENT				10
//Find_Image(pathFolder,L"JPG",count,BoradCellImage->m_ListPathIamge , BoradCellImage->m_ListFileType);
//	Find_Image(pathFolder,L"PNG",count,BoradCellImage->m_ListPathIamge , BoradCellImage->m_ListFileType);
//	Find_Image(pathFolder,L"BMP",count,BoradCellImage->m_ListPathIamge , BoradCellImage->m_ListFileType);

/* Use GDI plus*/
using namespace Gdiplus;
// Class View Image control derived from class CWnd of Window 
class CViewImageControl : public CWnd
{
	DECLARE_DYNAMIC(CViewImageControl)

	
protected:
	int m_nNumOfImage;		// Number of images which is displayed in this control
	int m_nWidthControl;	// Width of view image control
	int m_nHeightControl;	// Height of view image control
//	 CList<CBoardCell*>	m_lstCellElement;	// The list element
	CList <CImageControl*> *m_lstImageControl; 
	CList <CString> m_plstImageName;

	int m_nIndexView;
public:
	CString m_strPathFolderImage;
private:
	//RECT CalTopViewImageControl
	void FindImageInPath( CString PathFolderImage );
	void DrawImage();
public:
	CViewImageControl(void);
	~CViewImageControl(void);

	void SetNumberOfImage( int );
	void SetSizeOfImageControl( int Height, int Width ); 

	int GetNumOfImage();
	int GetViewImageControlWidth();
	int GetViewImageControlHeight();
	virtual BOOL CreateViewImageControl(int m_nWidthControl,	// width of control
										int m_nHeightControl,	// height of control
										int m_nNumOfImage,		// number of image
										RECT rect,				// rectangle of parent control
										CWnd* pParentWnd ) = 0;
	void LoadViewImage( CString pathFolderImage );

	DECLARE_MESSAGE_MAP()
//	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
};
#endif

//#pragma once
//#ifndef CBoardGame_H
//#define CBoardGame_H
//
//#include "afxwin.h"
//#include "BoardCell.h"
//#include "BoardCell2D.h"
//#include "BoardCell3D.h"
//#include "BaoTDText.h"
//
//#define GRAY RGB(236, 233, 216)
//
///* Use GDI plus*/
//using namespace Gdiplus;
//
//class CBoardGame : 	public CWnd
//{
//	DECLARE_DYNAMIC(CBoardGame)
//protected:
//	int					m_nRow;				// Row of Board
//	int					m_nColumn;			
//	
//	// Column of Board
//
//	BaoTDText*			m_pTextNameBoard;	// Name of Board
//public:
//	CBoardGame(void);
//	~CBoardGame(void);
//
//	void SetBoardRow( int nRow );			// Set Width 
//	void SetBoardColumn( int nColumn );		// Set Height
//	int GetBoardRow(  );					// Get Height
//	int GetBoardColumn(  );					// Get Width
//
//	//virtual BOOL CreateBoard2D(const RECT& rect, CWnd* pParentWnd );
//	//BOOL CreateBoard2D(int nRow, int nColumn, const RECT& rect, CWnd* pParentWnd );
//	virtual BOOL CreateBoard2D(int nRow, int nColumn, const RECT& rect, CWnd* pParentWnd ) = 0;
//	virtual BOOL CreateBoard3D(int nRow, int nColumn, const RECT& rect, CWnd* pParentWnd ) = 0;
//protected:	
//    CString m_strNameBoard;					// The name
//    int m_nNumberElement;					// Number of elements
//    CList<CBoardCell*>	m_lstCellElement;	// The list element
//
//	//CList<BaoTDText*>	m_lstTextNameBoard;	// Name of Board
//
//	DECLARE_MESSAGE_MAP()
//};
//
//#endif 